﻿using System.Windows;
using System.Windows.Browser;
using HelloWorld.Shared.Models;

namespace HelloWorld.Demo6
{
    /// <summary>
    /// Remove the DoitControl property, add the ClickDoitControl method
    /// Notice that Doit Button doesn't have the OnClick method!!
    /// </summary>
    [ScriptableType]
    public partial class Demo6
    {
        private readonly MainPageModel _model = new MainPageModel();

        public Demo6()
        {
            InitializeComponent();
            DataContext = _model;
        }

        /* protected override bool  IsPageBusy
        {
            get
            {
                return _model.IsProcessing;
            }
        }*/

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            _model.Doit();
        }
    }
}
